const cloud = require('wx-server-sdk')
    cloud.init({
      env: cloud.DYNAMIC_CURRENT_ENV
    })
    const db = cloud.database()
    const _ = db.command
    exports.main = async (event, context) => {
      var _id = event._id ? event._id : null;
      try {
        return await db.collection('th_cards').where({
          _id: _id
        }).remove()
      } catch(e) {
        console.error(e)
      }
    }